Skip to content

Commit

Permalink
# This is a combination of 5 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Update overpass-turbo site githuba action

# This is the commit message #2:

Update overpass build actions

# This is the commit message #3:

Update cancel-workflow-action

# This is the commit message #4:

Update cancel-workflow-action version

# This is the commit message #5:

Remove npm cli
  • Loading branch information
Rub21 committed Jul 16, 2024
1 parent 86efacf commit 64a6a50
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/frontend-overpass.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Build and Publish overpass-turbo site

on:
push:
branches:
- 'main'
- 'staging'

jobs:
overpass-turbo:
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}

Expand All @@ -30,22 +33,25 @@ jobs:
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_OVERPASS_CLOUDFRONT_ID }}

- name: Checkout overpass-turbo repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: OpenHistoricalMap/overpass-turbo
ref: 1893cef4c0ab4ce96ad0451103526c18ebabf8f6
# token: ${{env.DEV_GITHUB_TOKEN}}
ref: f4f5a0342b3d767a535febffcf9b9a1184c19ea5

- name: Use Node.js 16
uses: actions/setup-node@v1
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Prepare Yarn 4.3.1
run: corepack prepare [email protected] --activate

- name: Install modules
run: |
rm -rf node_modules
npm cache clean --force
yarn install --no-progress --frozen-lockfile
yarn install
- name: Build frontend
run: |
Expand All @@ -64,9 +70,8 @@ jobs:
- name: Push data to s3 and clean cloudfront cache
if: ${{ success() }}
run: |
aws s3 sync dist/ s3://${OVERPASS_BUCKET}/
aws s3 sync dist/ s3://${OVERPASS_BUCKET}/ --acl public-read
aws cloudfront create-invalidation --distribution-id=${CLOUDFRONT_DISTRIBUTION_ID} --paths=/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 comments on commit 64a6a50

Please sign in to comment.