Create Sample Problems Docs #18
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
| # This workflow checks out documentation from the pg repository and runs a | |
| # script to build the sample problem documtation | |
| name: Create Sample Problems Docs | |
| on: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| create-sample-problems: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Install Ubuntu dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends --no-install-suggests \ | |
| cpanminus \ | |
| pandoc \ | |
| libmojolicious-perl \ | |
| libyaml-libyaml-perl \ | |
| libpandoc-wrapper-perl | |
| - name: Checkout pg-docs code | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Checkout PG code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: openwebwork/pg | |
| ref: main | |
| path: pg | |
| persist-credentials: false | |
| - name: Parse sample problems | |
| run: | | |
| perl pg/bin/parse-problem-doc.pl \ | |
| --problem_dir=/home/runner/work/pg-docs/pg-docs/pg/doc/sample-problems \ | |
| --out_dir=/home/runner/work/pg-docs/pg-docs/sample-problems \ | |
| --pod_root=https://openwebwork.github.io/pg-docs/pod \ | |
| --pg_doc_home=https://openwebwork.github.io/pg-docs/sample-problems | |
| - name: Remove pg code | |
| run: rm -rf pg | |
| - name: Commit and push changes | |
| uses: devops-infra/action-commit-push@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_message: Updated sample problem docs | |
| force: true |