-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (58 loc) · 2.05 KB
/
produce_pod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow checks out the webwork2 and pg code, then runs the
# generate-ww-pg-pod.pl script and commits the results.
name: Build POD pages
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
create-pod:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Ubuntu dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends --no-install-suggests \
libpod-parser-perl \
libmojolicious-perl
- name: Checkout pg-docs code
uses: actions/checkout@v3
with:
persist-credentials: false
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout PG code
uses: actions/checkout@v3
with:
repository: openwebwork/pg
ref: develop
path: pg
persist-credentials: false
- name: Checkout WW code
uses: actions/checkout@v3
with:
repository: openwebwork/webwork2
ref: develop
path: webwork2
persist-credentials: false
# Run the generate pod script
- name: create POD
run: |
perl webwork2/bin/dev_scripts/generate-ww-pg-pod.pl -v \
--pg-root=/home/runner/work/pg-docs/pg-docs/pg \
--output-dir=/home/runner/work/pg-docs/pg-docs/pod \
--base-url=https://openwebwork.github.io/pg-docs/pod
- name: remove pg and webwork code
run: |
rm -rf pg
rm -rf webwork2
ls -l
git status
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: Updated POD
force: true