-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·50 lines (43 loc) · 1.38 KB
/
deploy-version.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
name: deploy
# only deploy site from docs branch
on:
push:
branches:
- docs
jobs:
deploy-version:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# - uses: actions/checkout@v2
# - uses: helaili/[email protected]
# env:
# JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
- name: get_version
run: echo "RELEASE_VERSION=2.10" >> $GITHUB_ENV
# you probably would do build and test steps here
# https://github.com/marketplace/actions/github-pages-action
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# deploy the current public folder
# to <base url>/x.y.z version subfolder
publish_dir: ./docs/_site
destination_dir: ${{ env.RELEASE_VERSION }}
- name: Deploy redirect
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./redirect
keep_files: true
- name: Deploy gsc
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gsc
keep_files: true