-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 5 commits.
# 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
Showing
1 changed file
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
||
|
@@ -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: | | ||
|
@@ -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 }} | ||
|