feat: add nginx proxy page for NodeJS #105
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
# Sustainability: Don't trigger build for updated README | |
paths-ignore: | |
- "**/README.md" | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Use Node LTS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" # lts | |
# This build runs with path prefix for github pages (hosted on subdirectory), | |
# for example https://<USER>.github.io/<REPO-NAME>/ | |
# See: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix | |
# - name: Install and Build for Github Pages 🔧 | |
# run: | | |
# npm ci | |
# npm run build | |
# env: | |
# # https://vitepress.vuejs.org/config/basics.html#base | |
# BASE_PATH: "/${{ github.event.repository.name }}/" | |
# Important > GitHub repo > settings > Actions --> | |
# Allow read AND write for Github Action token, otherwise this will result in a error (as deploy action tries to push) | |
# See https://github.com/JamesIves/github-pages-deploy-action/discussions/1104#discussioncomment-2678741 | |
# - name: Deploy 🚀 | |
# uses: JamesIves/[email protected] | |
# with: | |
# branch: gh-pages # The branch the action should deploy to. | |
# folder: docs/.vitepress/dist # The folder the action should deploy. | |
- name: Install and Build 🔧 | |
run: | | |
npm ci | |
npm run build | |
ls -lsa | |
echo "/home/sites/${{ secrets.SSH_ACCOUNT_ID }}/web/my-ddev-lab.mandrasch.eu/" | |
# transfer to separate webspace | |
- name: rsync deployments | |
uses: burnett01/[email protected] | |
with: | |
# be careful with delete! | |
switches: -avzr --delete | |
path: docs/.vitepress/dist/ | |
# e.g. /var/www/html/ | |
remote_path: "/home/sites/${{ secrets.SSH_ACCOUNT_ID }}/web/my-ddev-lab.mandrasch.eu/" | |
remote_host: ${{ secrets.SSH_HOST }} | |
remote_user: ${{ secrets.SSH_USER }} | |
remote_key: ${{ secrets.SSH_KEY }} |