Skip to content

Test Deploy

Test Deploy #12

Workflow file for this run

name: Deploy
on:
push:
branches:
- "*"
pull_request:
branches:
- develop
env:
PUBLIC: "~/motsflex/public"
ASSETS: "$PUBLIC/assets"
INDEX_HTML: "$PUBLIC/index.html"
DICOS: "~/dicos"
SERVER: "~/motsflex/server.js"
SSH_TARGET: ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Determine Deployment Type
id: deployment_type
run: |
echo "${{ github.event.pull_request.labels.*.name }}"
echo "DEPLOY_ASSETS=${{ contains(github.event.pull_request.labels.*.name, 'deploy:assets') }}" >> $GITHUB_ENV
echo "DEPLOY_SERVER=${{ contains(github.event.pull_request.labels.*.name, 'deploy:server') }}" >> $GITHUB_ENV
echo "DEPLOY_CLIENT=${{ contains(github.event.pull_request.labels.*.name, 'deploy:client') }}" >> $GITHUB_ENV
- name: Deploy
if: github.event_name == 'pull_request'
run: |
echo "Github ref: $GITHUB_REF"
if [[ "${{ env.DEPLOY_ASSETS }}" == 'true' ]]; then
echo "Deploying JS assets"
fi
if [[ "${{ env.DEPLOY_CLIENT }}" == 'true' ]]; then
echo "Deploying full client"
fi
if [[ "${{ env.DEPLOY_SERVER }}" == 'true' ]]; then
echo "Deploying server code"
fi