Skip to content

bug: fix revert id (#1368) #703

bug: fix revert id (#1368)

bug: fix revert id (#1368) #703

Workflow file for this run

name: github pages
on:
push:
branches:
- master
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.15"
- run: mdbook build docs
- name: Deploy master
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
destination_dir: master
cname: rust.fuel.network
if: github.ref == 'refs/heads/master'
- name: Get tag
id: branch_name
run: |
echo ::set-output name=BRANCH_NAME::${GITHUB_REF#refs/tags/}
if: startsWith(github.ref, 'refs/tags')
- name: Deploy tag
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
destination_dir: ${{ steps.branch_name.outputs.BRANCH_NAME }}
cname: rust.fuel.network
if: startsWith(github.ref, 'refs/tags')
- name: Create latest HTML redirect file
if: startsWith(github.ref, 'refs/tags')
run: |
mkdir ./latest
cat > ./latest/index.html <<EOF
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; URL=../${{ steps.branch_name.outputs.BRANCH_NAME }}/">
<link rel="canonical" href="../${{ steps.branch_name.outputs.BRANCH_NAME }}/">
EOF
- name: Set latest to point to tag
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./latest/
destination_dir: ./latest/
cname: rust.fuel.network
if: startsWith(github.ref, 'refs/tags')