try with master instead of tagged branch #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Deploy" | |
on: | |
push: | |
branches: | |
- main | |
- master | |
paths-ignore: | |
- .gitignore | |
- README.md | |
- LICENSE | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: '8.10' | |
- name: Setup system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz rename | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- name: Setup npm dependencies | |
run: | | |
cd cxxdraft-htmlgen | |
npm install split | |
npm install mathjax-node-cli | |
cd .. | |
export PATH=$PATH:$PWD/cxxdraft-htmlgen/node_modules/.bin | |
- name: Copy index | |
run: | | |
mkdir -p build | |
cp index.html build/index.html | |
- name: Build draft | |
continue-on-error: true | |
run: ./gen_standard.sh | |
- name: Build C++23 | |
continue-on-error: true | |
run: ./gen_standard.sh n4950 c++23 | |
- name: Build C++20 | |
continue-on-error: true | |
run: ./gen_standard.sh n4868 c++20 | |
- name: Build C++17 | |
continue-on-error: true | |
run: ./gen_standard.sh n4659 c++17 | |
- name: Build C++14 | |
continue-on-error: true | |
run: ./gen_standard.sh n4140 c++14 | |
- name: Build C++11 | |
continue-on-error: true | |
run: ./gen_standard.sh n3337 c++11 | |
- name: List output files | |
run: tree build | |
- name: Test site | |
run: | | |
if [ ! -f build/c++/intro.html ] | |
then | |
echo "Generating files failed." | |
exit 1 | |
fi | |
- name: Upload site artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |