-
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·58 lines (51 loc) · 1.52 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
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