diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c08c5db..e3b7589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: static-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7.0.1 - name: Run pre-commit hooks uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8e1aa4..fba4ce7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ --- -# https://github.com/marketplace/actions/s3-sync +# https://github.com/aws-actions/configure-aws-credentials # name: deploy on: @@ -10,7 +10,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7.0.1 - name: Static checks uses: pre-commit/action@v3.0.1 @@ -18,33 +18,36 @@ jobs: - name: Check service worker syntax run: node --check makeitwork.cloud/sw.js - - uses: jakejarvis/s3-sync-action@master + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v6.2.3 with: - args: > - --acl public-read --follow-symlinks --delete - --exclude '.git/*' --exclude '.github/*' - --exclude '.pre-commit-config.yaml' - --exclude 'README.md' - env: - AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} - SOURCE_DIR: 'makeitwork.cloud/' + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - uses: jakejarvis/s3-sync-action@master + - name: Sync makeitwork.cloud + run: >- + aws s3 sync makeitwork.cloud/ "s3://${{ secrets.AWS_S3_BUCKET }}/" + --no-progress --acl public-read --follow-symlinks --delete + --exclude '.git/*' --exclude '.github/*' + --exclude '.pre-commit-config.yaml' + --exclude 'README.md' + + - name: Configure onion AWS credentials + uses: aws-actions/configure-aws-credentials@v6.2.3 with: - args: > - --acl public-read --follow-symlinks --delete - --exclude '.git/*' --exclude '.github/*' - --exclude '.pre-commit-config.yaml' - --exclude 'README.md' - env: - AWS_S3_BUCKET: ${{ secrets.ONION_AWS_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.ONION_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.ONION_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.ONION_AWS_REGION }} - SOURCE_DIR: 'onion.makeitwork.cloud/' + aws-access-key-id: ${{ secrets.ONION_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.ONION_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.ONION_AWS_REGION }} + unset-current-credentials: true + + - name: Sync onion.makeitwork.cloud + run: >- + aws s3 sync onion.makeitwork.cloud/ "s3://${{ secrets.ONION_AWS_S3_BUCKET }}/" + --no-progress --acl public-read --follow-symlinks --delete + --exclude '.git/*' --exclude '.github/*' + --exclude '.pre-commit-config.yaml' + --exclude 'README.md' - name: Purge Cloudflare Cache run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ad5802..e18eadc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,11 +18,14 @@ repos: entry: gitleaks dir --redact --verbose . pass_filenames: false - repo: https://github.com/rhysd/actionlint - rev: v1.7.11 + rev: v1.7.12 hooks: - id: actionlint - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 + - repo: local hooks: - id: prettier + name: prettier + entry: prettier --write --list-different --ignore-unknown + language: node + additional_dependencies: [prettier@3.9.6] types_or: [html, json, markdown] diff --git a/makeitwork.cloud/index.html b/makeitwork.cloud/index.html index c7d0ad6..59266e2 100644 --- a/makeitwork.cloud/index.html +++ b/makeitwork.cloud/index.html @@ -78,7 +78,7 @@