Fix permissions #3
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
name: prod | |
on: | |
push: | |
branches: | |
- 'cesium.com' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install node 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: npm install | |
run: npm install | |
- name: lint *.js | |
run: npm run eslint | |
- name: lint *.md | |
run: npm run markdownlint | |
- name: format code | |
run: npm run prettier-check | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
PROD: true | |
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: us-east-1 | |
BRANCH: ${{ github.ref_name }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPO: ${{ github.repository }} | |
GITHUB_SHA: ${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install node 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: npm install | |
run: npm install | |
- name: build website release | |
run: npm run website-release | |
- name: build apps | |
run: npm run build-apps | |
- name: deploy to cesium.com | |
if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | |
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800'--skip --confirm |