Skip to content

Commit

Permalink
ci: remove lint, combine jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
skripted-io committed Oct 25, 2023
1 parent 056d027 commit ee33152
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
pull-requests: write # comment on released pull requests

jobs:
sync-s3:
build-sync-purge:
runs-on: ubuntu-latest

permissions:
Expand All @@ -29,13 +29,12 @@ jobs:
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
TRIGGER_DEPLOY: ${{ startsWith(github.ref, 'refs/heads/master') }}
FASTLY_API_TOKEN: ${{ secrets.FASTLY_KEY }}
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}

steps:
- uses: actions/checkout@v4

- uses: wagoid/commitlint-github-action@v5
if: github.event_name == 'pull_request'

- uses: actions/setup-node@v3
with:
cache: "npm"
Expand Down Expand Up @@ -68,16 +67,7 @@ jobs:
run: |
aws s3 sync resources s3://${{ env.S3_BUCKET_NAME }} $([[ "$TRIGGER_DEPLOY" == "false" ]] && echo "--dryrun")
fastly-purge-all:
runs-on: ubuntu-latest
needs: sync-s3
if: github.ref == 'refs/heads/master'
env:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_KEY }}
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
steps:
- uses: actions/checkout@v4

- name: Purge Fastly Cache
if: github.ref == 'refs/heads/master'
run: |
curl -X POST -H "Fastly-Key: ${{ secrets.FASTLY_API_TOKEN }}" https://api.fastly.com/service/${{ secrets.FASTLY_SERVICE_ID }}/purge_all

0 comments on commit ee33152

Please sign in to comment.