Skip to content

Commit 837b683

Browse files
committed
Update GitHub Actions workflow
1 parent 9edf2ba commit 837b683

1 file changed

Lines changed: 30 additions & 19 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,50 @@
1-
name: Deploy Doxygen Documentation
1+
name: Deploy Documentation to GitHub Pages
22

33
on:
44
push:
55
branches: [ main, develope ]
6-
pull_request:
7-
branches: [ main, develope ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
816

917
jobs:
1018
build-and-deploy:
19+
name: Build and Deploy
1120
runs-on: ubuntu-latest
1221

1322
steps:
14-
- name: Checkout
23+
- name: Checkout code
1524
uses: actions/checkout@v4
16-
17-
- name: Install Doxygen
25+
26+
- name: Install dependencies
1827
run: |
1928
sudo apt-get update
20-
sudo apt-get install -y doxygen graphviz
21-
22-
- name: Generate Documentation
29+
sudo apt-get install -y g++ make doxygen graphviz
30+
31+
- name: Generate documentation
2332
run: |
2433
echo "Current directory: $(pwd)"
25-
echo "Checking if Doxyfile exists in root:"
34+
echo "Checking if Doxyfile exists:"
2635
ls -la Doxyfile
27-
echo "Contents of lab2 directory:"
28-
ls -la lab2/
2936
echo "Doxygen version:"
3037
doxygen --version
3138
doxygen Doxyfile
32-
33-
- name: Deploy to GitHub Pages
34-
uses: peaceiris/actions-gh-pages@v3
35-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develope'
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
3645
with:
37-
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: ./docs/html
39-
destination_dir: docs
46+
path: docs/html
47+
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)