-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.67 KB
/
Copy pathdeploy.yml
File metadata and controls
66 lines (56 loc) · 1.67 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# .github/workflows/deploy.yml
name: Deploy to GitHub Pages
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get version from package.json
id: version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./out
publish_branch: master
external_repository: inject3r/inject3r.github.io
destination_dir: atomhttp
commit_message: "Deploy atomhttp v${{ steps.version.outputs.VERSION }}"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: Release v${{ steps.version.outputs.VERSION }}
body: |
## What's Changed
- Auto-generated release from commit ${{ github.sha }}
- Deployed to https://inject3r.github.io/atomhttp/
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}