Merge pull request #186 from atcoder/opt/dsu #217
Workflow file for this run
This file contains hidden or 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: Document | |
on: [push, pull_request] | |
jobs: | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set version name | |
id: version | |
run: echo "::set-output name=VERSION_NAME::${GITHUB_REF##*/}" | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user -r tools/requirements.txt | |
- name: Generate documents (and remove markdown) | |
run: | | |
cd tools && | |
./generate_document.py --tag $VERSION && | |
./generate_zip.py && | |
rm ../document_ja/*.md ../document_en/*.md && | |
mkdir generated && | |
mv ../document_ja generated/ && | |
mv ../document_en generated/ | |
env: | |
VERSION: ${{ steps.version.outputs.VERSION_NAME }} | |
- name: Publish to github pages | |
if: ${{ github.event_name == 'push' }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./tools/generated | |
destination_dir: ${{ steps.version.outputs.VERSION_NAME }} | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ac-library | |
path: tools/ac-library.zip |