-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.1 KB
/
deploy_github_pages.yml
File metadata and controls
73 lines (61 loc) · 2.1 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
63
64
65
66
67
68
69
70
71
72
73
name: Deploy to GitHub Pages
on: workflow_dispatch
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: cycodelabs/cimon-action@v0
with:
prevent: true
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
allowed-hosts: |
registry.npmjs.org
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Test build
run: npm run build
release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
pages: write
steps:
- uses: cycodelabs/cimon-action@v0
with:
prevent: true
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
allowed-hosts: |
registry.npmjs.org
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Test build
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com