-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml.example
More file actions
36 lines (29 loc) · 926 Bytes
/
deploy.yml.example
File metadata and controls
36 lines (29 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Optional: Deploy with GitHub Token Injection
#
# SETUP:
# 1. Rename to: .github/workflows/deploy.yml
# 2. Create token: https://github.com/settings/tokens/new (scope: public_repo)
# 3. Add secret: Settings → Secrets → Actions → PORTFOLIO_GITHUB_TOKEN
# 4. Enable Pages: Settings → Pages → Source: GitHub Actions
# 5. Push and deploy!
name: Deploy to GitHub Pages
on:
push:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Inject token into index.html
run: sed -i 's/init=true/init=true\&token=${{ secrets.PORTFOLIO_GITHUB_TOKEN }}/g' index.html
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: '.'
- uses: actions/deploy-pages@v4