Skip to content

Commit f0eb514

Browse files
committed
Workflow update
1 parent 67bd607 commit f0eb514

File tree

1 file changed

+33
-19
lines changed

1 file changed

+33
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,41 @@ name: Deploy
22

33
on:
44
push:
5-
branches: [ 'master' ]
5+
branches: [ 'main' ]
6+
workflow_dispatch:
67

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
717
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 11
25+
cache: 'npm'
26+
- uses: actions/configure-pages@v2
27+
id: pages
28+
- run: npm ci
29+
- run: npm run build
30+
- uses: actions/upload-pages-artifact@v1
31+
with:
32+
path: _book
33+
834
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
938
runs-on: ubuntu-latest
39+
needs: build
1040
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v1
13-
with:
14-
node-version: '11.x'
15-
- uses: actions/cache@v2
16-
with:
17-
path: ~/.npm
18-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
19-
restore-keys: |
20-
${{ runner.OS }}-node-
21-
${{ runner.OS }}-
22-
- run: npm ci
23-
- run: npm run build
24-
- uses: peaceiris/actions-gh-pages@v3
25-
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
cname: docs.gitlocalize.com
28-
publish_dir: ./_book
41+
- uses: actions/deploy-pages@v1
42+
id: deployment

0 commit comments

Comments
 (0)