This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new prod * exclude test * test new prod * next test * test with key * changed dir * new envs * removing comments * ci: use fewer builds * ci: fix missing download * ci: specify workflow * ci: revert changes * ci: change deploy branches --------- Co-authored-by: Kevin Yven Riexinger <info@kevinriexinger.de>
- Loading branch information
Showing
4 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,45 @@ | ||
name: Vercel Production Deployment | ||
name: Hetzner Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
SERVER_HOST: ${{ secrets.SERVER_HOST }} | ||
SERVER_PORT: ${{ secrets.SERVER_PORT }} | ||
SERVER_USER: ${{ secrets.SERVER_USER }} | ||
SERVER_PASS: ${{ secrets.SERVER_PASS }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: 'hetzner-prod' | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
Deploy-Production: | ||
Deploy-Production-Hetzner: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Node Setup | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: npm clean install | ||
run: npm ci | ||
|
||
- name: npm build | ||
run: npm run build | ||
|
||
- name: copy file via ssh key | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SERVER_HOST }} | ||
port: ${{ secrets.SERVER_PORT }} | ||
username: ${{ secrets.SERVER_USER }} | ||
password: ${{ secrets.SERVER_PASS }} | ||
key: ${{ secrets.SERVER_KEY }} | ||
source: './out' | ||
target: 'public/' | ||
strip_components: 2 # this is important |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
push: | ||
branches-ignore: | ||
- main | ||
- test | ||
jobs: | ||
Deploy-Preview: | ||
runs-on: ubuntu-latest | ||
|