update psp talk #601
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: CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: "1 2 3 * *" # run at 2 AM UTC once a week | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get update | |
- run: sudo apt-get -y install ghostscript | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: ".nvmrc" | |
- run: npm install | |
- run: npm run lint | |
- run: npm run build | |
- name: Tar files | |
run: tar -cf dist.tar ./dist | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: dist.tar | |
path: dist.tar | |
publish: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://talks.cns.me | |
permissions: | |
id-token: write | |
needs: | |
- build | |
if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: dist.tar | |
- run: tar -xf dist.tar | |
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4 | |
with: | |
role-to-assume: arn:aws:iam::557195821817:role/talks-cns-me-write | |
aws-region: eu-west-2 | |
- run: aws s3 sync --delete dist s3://talks.cns.me |