feat: html dir #19
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 | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: ./compile/build | |
- name: Clear old version | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PORT: ${{ secrets.PORT }} | |
KEY: ${{ secrets.SSHKEY }} | |
script: rm -r /srv/ftp/public/libs/* || true | |
- name: Copy repository contents via scp | |
uses: appleboy/scp-action@master | |
env: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PORT: ${{ secrets.PORT }} | |
KEY: ${{ secrets.SSHKEY }} | |
with: | |
source: "./build/*" | |
target: "/srv/ftp/public/libs" | |
- name: Move scripts to right location | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PORT: ${{ secrets.PORT }} | |
KEY: ${{ secrets.SSHKEY }} | |
script: mv /srv/ftp/public/libs/build/* /srv/ftp/public/libs/ || true | |
- name: Remove build folder | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PORT: ${{ secrets.PORT }} | |
KEY: ${{ secrets.SSHKEY }} | |
script: rm -r /srv/ftp/public/libs/build || true | |
- name: Trigger qgo.eu redeploy | |
run: | | |
curl -X POST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/QRGameStudio/web-qgo.eu/dispatches --data '{"event_type": "build_application"}' |