Skip to content

Commit

Permalink
ci for deploying fuelup version (#58)
Browse files Browse the repository at this point in the history
* ci for deploying fuelup version

* rename: env.FUELUP_DIR -> env.FUELUP_INIT_DIR

* add missing mkdir

* Remove redundant if checks

* Better step name for copying into fuelup-version

* rename: gh-pages-init -> gh-pages-meta
  • Loading branch information
bing authored Jun 2, 2022
1 parent f67d7bc commit 2687b57
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 36 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/gh-pages-init.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/gh-pages-meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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 }}
- name: Deploy latest fuelup init
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ${{ env.FUELUP_INIT_DIR }}
destination_dir: ./

- name: Get latest tag and copy into fuelup-version
run: |
mkdir -p ${{ env.FUELUP_VERSION_DIR }}
echo ${GITHUB_REF#refs/tags/} >> fuelup-version
cp fuelup-version ${{ env.FUELUP_VERSION_DIR }}
- name: Deploy latest fuelup version
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ${{ env.FUELUP_VERSION_DIR }}
destination_dir: ./

0 comments on commit 2687b57

Please sign in to comment.