This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
Merge pull request #150 from kevinriex/dependabot/npm_and_yarn/main/s… #162
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
name: Hetzner Production Deployment | |
env: | |
SERVER_HOST: ${{ secrets.SERVER_HOST }} | |
SERVER_PORT: ${{ secrets.SERVER_PORT }} | |
SERVER_USER: ${{ secrets.SERVER_USER }} | |
SERVER_PASS: ${{ secrets.SERVER_PASS }} | |
SERVER_PHRASE: ${{ secrets.SERVER_PHRASE }} | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: "hetzner-prod" | |
cancel-in-progress: false | |
jobs: | |
Deploy-Production-Hetzner: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Node Setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: npm clean install | |
run: npm ci | |
- name: Install additional dependencies | |
run: | | |
sudo apt-get install ghostscript | |
sudo apt-get install graphicsmagick | |
- 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 }} | |
#passphrase: ${{ secrets.SERVER_PHRASE }} | |
source: "./out" | |
target: "public/" | |
rm: true | |
strip_components: 2 # this is important |