Merge branch 'main' of https://github.com/leonmelein/Swimspots #20
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: Deploy Site | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ['main'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
environment: | |
name: Staging | |
runs-on: Staging | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Copy site contents | |
run: cp -r /home/github-actions/actions-runner/_work/Swimspots/Swimspots/dist/. /www/swimspots | |
- name: Reload Nginx | |
run: sudo /usr/sbin/service nginx reload |