-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.26 KB
/
deploy.yml
File metadata and controls
49 lines (43 loc) · 1.26 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
name: deploy
permissions:
contents: write
pages: write
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install dependencies
run: yarn install
- name: Build project and prepare for deployment
env:
VITE_EMAIL_ADDRESS: ${{ vars.EMAIL_ADDRESS }}
VITE_LINKEDIN_USERNAME: ${{ vars.USERNAME_LINKEDIN }}
VITE_GITHUB_USERNAME: ${{ vars.USERNAME_GITHUB }}
VITE_TWITTER_USERNAME: ${{ vars.USERNAME_TWITTER }}
VITE_CV_URL: ${{ vars.CV_URL }}
run: |
yarn build
touch dist/.nojekyll
cp CNAME ./dist
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
if: success()
with:
target_branch: gh-pages
build_dir: dist
commit_message: |
${{ github.event_name == 'push' && format('chore(release): {0}', github.ref_name) || 'chore(release): Push to Github Pages' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}