Skip to content

Commit 4b173b3

Browse files
authored
Update manual-publish.yml
1 parent 67694c4 commit 4b173b3

File tree

1 file changed

+47
-33
lines changed

1 file changed

+47
-33
lines changed
Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,72 @@
11
name: CI
22

3-
# Reference documentation: https://docs.github.com/en/actions/reference
4-
5-
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
63
on:
74
push:
85
branches: [pl-wcag-22-nowe]
9-
# Allows you to run this workflow manually from the Actions tab
106
workflow_dispatch:
11-
12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
7+
138
permissions:
14-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
1516

1617
jobs:
17-
main:
18-
name: deploy
18+
build:
19+
name: Build pages
1920
runs-on: ubuntu-24.04
20-
env:
21-
GH_REF: github.com/irdpl/wcag.git
21+
2222
steps:
23-
- name: Checkout the repository
23+
- name: Checkout repository
2424
uses: actions/checkout@v4
25+
2526
- name: Setup Java
26-
# see https://github.com/actions/setup-java#supported-distributions
27-
# note that this also deploys ant
2827
uses: actions/setup-java@v4
2928
with:
30-
distribution: 'adopt'
29+
distribution: adopt
3130
java-version: '11'
32-
- name: before_install
31+
32+
- name: Install Ant
3333
run: |
3434
tar -xzvf lib/apache-ant-1.10.6-bin.tar.gz
35-
export PATH=`pwd`/apache-ant-1.10.6/bin:$PATH
36-
- name: script
35+
echo "$(pwd)/apache-ant-1.10.6/bin" >> $GITHUB_PATH
36+
37+
- name: Build site
3738
run: |
38-
mkdir output
39+
mkdir -p output
3940
git clone --depth=1 --branch=gh-pages https://github.com/irdpl/wcag.git output
40-
curl https://www.w3.org/publications/spec-generator/?type=respec"&"url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/guidelines/index.html -o output/guidelines/22/index.html -f --retry 3
41-
curl https://www.w3.org/publications/spec-generator/?type=respec"&"url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/requirements/22/index.html -o output/requirements/22/index.html -f --retry 3
42-
curl https://www.w3.org/publications/spec-generator/?type=respec"&"url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/conformance-challenges/index.html -o output/conformance-challenges/index.html -f --retry 3
41+
42+
curl -f --retry 3 \
43+
"https://www.w3.org/publications/spec-generator/?type=respec&url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/guidelines/index.html" \
44+
-o output/guidelines/22/index.html
45+
46+
curl -f --retry 3 \
47+
"https://www.w3.org/publications/spec-generator/?type=respec&url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/requirements/22/index.html" \
48+
-o output/requirements/22/index.html
49+
50+
curl -f --retry 3 \
51+
"https://www.w3.org/publications/spec-generator/?type=respec&url=https://raw.githack.com/irdpl/wcag/pl-wcag-22-nowe/conformance-challenges/index.html" \
52+
-o output/conformance-challenges/index.html
53+
4354
ant deploy
4455
45-
- name: Upload Artifact
46-
#if: failure() # Upload artifact only if the previous step (Build) fails
47-
uses: actions/upload-artifact@v4
56+
- name: Upload Pages artifact
57+
uses: actions/upload-pages-artifact@v3
4858
with:
49-
name: failed-artifact
50-
path: |
51-
./output
59+
path: ./output
5260

61+
deploy:
62+
name: Deploy to GitHub Pages
63+
needs: build
64+
runs-on: ubuntu-24.04
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
69+
steps:
5370
- name: Deploy
54-
uses: peaceiris/actions-gh-pages@v3
55-
with:
56-
github_token: ${{ secrets.GITHUB_TOKEN }}
57-
publish_dir: ./output
58-
cname: wcag.irdpl.pl
71+
id: deployment
72+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)