-
Notifications
You must be signed in to change notification settings - Fork 17
62 lines (59 loc) · 1.67 KB
/
Copy pathmain.yml
File metadata and controls
62 lines (59 loc) · 1.67 KB
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
59
60
61
62
name: Build and deploy
permissions:
actions: write
attestations: none
checks: write
contents: write
deployments: none
id-token: write
issues: none
discussions: none
packages: none
pages: write
pull-requests: none
repository-projects: write
security-events: none
statuses: none
on:
push:
branches:
- main
schedule:
- cron: '20 04 * * *'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: npm
node-version-file: '.nvmrc'
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Run Puppeteer tests
run: |
./run-tests.sh
git config --global user.name "GitHub Actions"
git config --global user.email "username@users.noreply.github.com"
git add data --all
git commit -a -m "Test results obtained via GitHub Actions"
git push
- name: Build
run: |
npm install
npm run build
- name: Set up SSH
uses: webfactory/ssh-agent@d4b9b8ff72958532804b70bbe600ad43b36d5f2e # v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy
uses: JamesIves/github-pages-deploy-action@22a6ee251d6f13c6ab1ecb200d974f1a6feb1b8d # v4.4.2
with:
ssh-key: true
single-commit: true
branch: gh-pages
folder: dist