Skip to content

Commit 98f8f9d

Browse files
authored
Update github-actions-demo.yml
1 parent 61c82a2 commit 98f8f9d

File tree

1 file changed

+47
-15
lines changed

1 file changed

+47
-15
lines changed
Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,50 @@
1-
name: GitHub Actions Demo
2-
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
3-
on: [workflow_dispatch]
1+
name: Deploy Pages
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches:
8+
- "main"
9+
paths:
10+
- "docs/**"
11+
- mkdocs.yml
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
422
jobs:
5-
Explore-GitHub-Actions:
23+
build:
624
runs-on: ubuntu-latest
725
steps:
8-
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
9-
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
10-
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
11-
- name: Check out repository code
12-
uses: actions/checkout@v4
13-
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
14-
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
15-
- name: List files in the repository
16-
run: |
17-
ls ${{ github.workspace }}
18-
- run: echo "🍏 This job's status is ${{ job.status }}."
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- run: ls -la
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v2
31+
- name: Setup Python, install plugins, and build site
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: 3.x
35+
- run: pip install mkdocs
36+
- run: pip install mkdocs-section-index
37+
- run: mkdocs build --site-dir ./_site
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v1
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)