-
Notifications
You must be signed in to change notification settings - Fork 14
38 lines (37 loc) · 1.09 KB
/
main.yml
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
name: Build and deploy
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: Fetch data
run: |
./get-test-results.sh
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
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