-
Notifications
You must be signed in to change notification settings - Fork 144
59 lines (51 loc) · 1.75 KB
/
gh-pages-meta.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
59
name: Publish fuelup-init.sh
on:
release:
types: [published]
env:
FUELUP_INIT_DIR: ./fuelup-init.sh.d/
FUELUP_VERSION_DIR: ./fuelup-version.d/
jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
deploy:
needs: cancel-previous-runs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Copy fuelup-init.sh
run: |
mkdir -p ${{ env.FUELUP_INIT_DIR }}
cp fuelup-init.sh ${{ env.FUELUP_INIT_DIR }}
cp fuelup-init.sh ${{ env.FUELUP_INIT_DIR }}/index.html
- name: Deploy latest fuelup init
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REPO_TOKEN }}
keep_files: true
publish_dir: ${{ env.FUELUP_INIT_DIR }}
destination_dir: ./
user_name: 'fuel-service-user'
user_email: '[email protected]'
- name: Get latest tag and copy into fuelup-version
run: |
mkdir -p ${{ env.FUELUP_VERSION_DIR }}
FUELUP_VERSION="${GITHUB_REF#refs/tags/}"
# trim v from tag prefix
FUELUP_VERSION="${FUELUP_VERSION#v}"
echo $FUELUP_VERSION >> fuelup-version
cp fuelup-version ${{ env.FUELUP_VERSION_DIR }}
- name: Deploy latest fuelup version
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REPO_TOKEN }}
keep_files: true
publish_dir: ${{ env.FUELUP_VERSION_DIR }}
destination_dir: ./
user_name: 'fuel-service-user'
user_email: '[email protected]'