Skip to content

Fix use master branch when building dev version #11

Fix use master branch when building dev version

Fix use master branch when building dev version #11

Workflow file for this run

name: builder
on:
push:
branches:
- docs
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout (for dev)
uses: actions/checkout@v3
with:
ref: master
path: 'dev'
- name: Build dev version
run: |
mkdir -p dev/fonts
pushd dev
pushd fonts
wget "https://github.com/sandorex/compacity-fonts/releases/download/DEV/CompacityFonts.zip"
unzip *.zip
rm *.zip
popd # fonts
npm install
npm run gen
# remove bloat
rm -rf node_modules
popd # dev
- name: Build latest release
run: |
mkdir -p fonts
# build the latest release
pushd fonts/
wget "https://github.com/sandorex/compacity-fonts/releases/latest/download/CompacityFonts.zip"
unzip *.zip
rm *zip
popd
npm install
npm run gen
# remove bloat
rm -rf node_modules
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2