Skip to content

Commit 9863a4c

Browse files
committed
docs: add deployment instructions for github pages
1 parent 6e468f9 commit 9863a4c

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow on push to the main branch
5+
push:
6+
branches: [ main ]
7+
# Also allow manual triggering
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
deploy:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v3
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v2
37+
with:
38+
# Upload entire repository
39+
path: '.'
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v3

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ Alternatively, you can use any local web server like:
8181
- PHP: `php -S localhost:8000`
8282
- Apache: Serve the directory through your local Apache server
8383

84+
## Deployment
85+
86+
This project includes a GitHub Actions workflow for automatic deployment to GitHub Pages:
87+
88+
1. The workflow is defined in `.github/workflows/deploy.yml`
89+
2. It automatically triggers on pushes to the `main` branch
90+
3. It can also be manually triggered through the GitHub Actions interface
91+
92+
To enable GitHub Pages deployment:
93+
94+
1. Go to your repository settings
95+
2. Navigate to "Pages" in the sidebar
96+
3. Under "Source", select "GitHub Actions"
97+
4. The site will automatically deploy on the next push to the main branch
98+
99+
The deployed site will be available at `https://<username>.github.io/<repository-name>/`
100+
84101
## Privacy
85102

86103
CommonKey is designed with privacy in mind:

0 commit comments

Comments
 (0)