Skip to content

Commit a68f9bd

Browse files
committed
ci: pin actions version and cleanup workflow
1 parent 7e6433c commit a68f9bd

File tree

1 file changed

+10
-79
lines changed

1 file changed

+10
-79
lines changed

.github/workflows/ci_cd.yml

Lines changed: 10 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: "Check documentation style"
30-
uses: ansys/actions/doc-style@v10
30+
uses: ansys/actions/doc-style@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14
3131
with:
3232
token: ${{ secrets.GITHUB_TOKEN }}
3333

@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-22.04
3737
steps:
3838
- name: Setup headless display
39-
uses: pyvista/setup-headless-display-action@v4
39+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
4040

4141
- name: "Install mermaid-cli"
4242
run: npm install -g @mermaid-js/mermaid-cli
@@ -48,92 +48,23 @@ jobs:
4848
sudo apt-get install graphviz
4949
5050
- name: "Build project documentation"
51-
uses: ansys/actions/doc-build@v10
51+
uses: ansys/actions/doc-build@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14
5252
with:
5353
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5454
use-python-cache: false
5555
skip-install: true
5656
dependencies: 'texlive-latex-extra latexmk nodejs npm'
5757

5858
doc-deploy:
59-
name: "Deploy documentation"
59+
name: Deploy documentation
60+
if: github.ref == 'refs/heads/main'
6061
runs-on: ubuntu-latest
61-
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags')
6262
needs: doc-build
6363
steps:
64-
65-
- name: "Download HTML documentation artifacts"
66-
uses: actions/download-artifact@v5
64+
- name: Upload development documentation
65+
uses: ansys/actions/doc-deploy-dev@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14
6766
with:
68-
name: documentation-html
69-
path: documentation-html
70-
71-
- uses: peaceiris/actions-gh-pages@v4
72-
with:
73-
github_token: ${{ secrets.GITHUB_TOKEN }}
74-
publish_dir: documentation-html
75-
cname: ${{ env.DOCUMENTATION_CNAME }}
76-
full_commit_message: ${{ github.event.head_commit.message }}
77-
force_orphan: true
78-
79-
release-github:
80-
name: "Release to GitHub"
81-
runs-on: ubuntu-latest
82-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
83-
needs: doc-build
84-
steps:
85-
86-
- name: "Download HTML documentation"
87-
uses: actions/download-artifact@v5
88-
with:
89-
name: documentation-html
90-
path: documentation-html
91-
92-
- name: "Zip HTML documentation"
93-
uses: vimtor/action-zip@v1
94-
with:
95-
files: documentation-html
96-
dest: documentation-html.zip
97-
98-
- name: "Download PDF documentation"
99-
uses: actions/download-artifact@v5
100-
with:
101-
name: documentation-pdf
102-
path: documentation-pdf
103-
104-
- name: "Zip PDF documentation"
105-
uses: vimtor/action-zip@v1
106-
with:
107-
files: documentation-pdf
108-
dest: documentation-pdf
109-
110-
- name: "Display the structure of downloaded files"
111-
shell: bash
112-
run: ls -R
113-
114-
- name: "Release to GitHub"
115-
uses: softprops/action-gh-release@v2
116-
with:
117-
files: |
118-
documentation-html.zip
119-
documentation-pdf
120-
121-
doc-deploy-github-release:
122-
name: "Deploy documentation (stable)"
123-
runs-on: ubuntu-latest
124-
needs: [release-github]
125-
steps:
126-
127-
- name: "Download HTML documentation artifacts"
128-
uses: actions/download-artifact@v5
129-
with:
130-
name: documentation-html
131-
path: documentation-html
132-
133-
- uses: peaceiris/actions-gh-pages@v4
134-
with:
135-
github_token: ${{ secrets.GITHUB_TOKEN }}
136-
publish_dir: documentation-html
67+
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
68+
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
13769
cname: ${{ env.DOCUMENTATION_CNAME }}
138-
full_commit_message: ${{ github.event.head_commit.message }}
139-
force_orphan: true
70+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)