-
Notifications
You must be signed in to change notification settings - Fork 54
58 lines (51 loc) · 1.84 KB
/
gh-pages.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: gh-pages
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build
env:
DENO_INSTALL: /home/runner/.deno
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh
export PATH="$DENO_INSTALL/bin:$PATH"
deno --version
deno upgrade --version 1.8.0
deno install --unstable --allow-env --allow-read --allow-write --allow-net --allow-run -n pagic https://deno.land/x/[email protected]/mod.ts
pagic build
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
GA_ID: UA-169223577-1
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: deno-tutorial.js.org
build-and-deploy-cn:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build CN
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
DENO_INSTALL: /home/runner/.deno
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh
export PATH="$DENO_INSTALL/bin:$PATH"
deno --version
deno upgrade --version 1.6.3
deno install --unstable --allow-env --allow-read --allow-write --allow-net --allow-run -n pagic https://deno.land/x/[email protected]/mod.ts
pagic build
- name: Deploy CN
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
GA_ID: UA-169621310-1
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: denocn/deno-tutorial
publish_dir: ./dist
cname: tutorial.deno.js.cn