Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

update some information #3

update some information

update some information #3

Workflow file for this run

on:
push:
branches:
- master
tags:
- '*'
jobs:
pages:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build theme
run: |
npm install
npm run build
- id: git-tag
name: Split tag
if: github.ref_type == 'tag'
uses: auguwu/git-tag-action@master
- name: Create tag directories
if: github.ref_type == 'tag'
run: |
mkdir -p build/${{ steps.git-tag.outputs.major }}
cp theme/technative.css build/${{ steps.git-tag.outputs.major }}
mkdir -p build/${{ steps.git-tag.outputs.major }}.${{ steps.git-tag.outputs.minor }}
cp theme/technative.css build/${{ steps.git-tag.outputs.major }}.${{ steps.git-tag.outputs.minor }}
mkdir -p build/${{ github.ref_name }}
cp theme/technative.css build/${{ github.ref_name }}
- name: Create sha and latest directories
run: |
# Short sha
mkdir -p build/${GITHUB_SHA::7}
cp theme/technative.css build/${GITHUB_SHA::7}
# Long sha
mkdir -p build/${GITHUB_SHA}
cp theme/technative.css build/${GITHUB_SHA}
# Latest
mkdir -p build/latest
cp theme/technative.css build/latest
ls -R build
- name: Copy demo presentation
run: |
# Clean old state
rm -rf build/demo/
# We cannot put it in the root, because old files are not removed
cp -r _static build/demo
# Because the static build includes a _assets directory
touch build/.nojekyll
cat <<EOF > build/index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=./demo">
<script type="text/javascript">
window.location.href = "demo"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href='demo'>link to example</a>.
</body>
</html>
EOF
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build # The folder the action should deploy.
clean: false