Skip to content

Commit 703fb04

Browse files
author
iamwatchdogs
committed
Added deploy-gh-pages.yml
1 parent 1f3df2b commit 703fb04

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: deploy
2+
3+
on:
4+
workflow_run:
5+
workflows: [update-contributor-details]
6+
types: [completed]
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
# Build job
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/[email protected]
26+
- name: Setting up python environment
27+
uses: actions/[email protected]
28+
- name: Replace md table with HTML table
29+
run: |
30+
if [ -f ".github/data/contributors-log.json" ]; then
31+
python .github/scripts/convert_to_html_tables.py
32+
else
33+
echo "contributors log is not present, proceeding to deploy anyway..."
34+
fi
35+
env:
36+
REPO_NAME: ${{ github.repository }}
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v3
39+
- name: Build with Jekyll
40+
uses: actions/jekyll-build-pages@v1
41+
with:
42+
source: ./
43+
destination: ./_site
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v2
46+
47+
# Deployment job
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)