Skip to content

Merge pull request #151 from Music-Bot-for-Jitsi/migrate-domain #25

Merge pull request #151 from Music-Bot-for-Jitsi/migrate-domain

Merge pull request #151 from Music-Bot-for-Jitsi/migrate-domain #25

Workflow file for this run

name: CD
on:
push:
branches: [main, dev]
jobs:
gh-release:
runs-on: ubuntu-latest
permissions:
actions: none
checks: none
contents: write
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
- name: "Set up Node.js"
uses: actions/setup-node@v2.2.0
with:
node-version: 16
- name: "Install all dependencies"
run: npm ci --prefix frontend
- name: "Run build"
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]
then
# build for the main website
npm run build --prefix frontend
else
# build for the beta subfolder
npm run build --prefix frontend -- --base=/beta
fi
- name: "Determine sublocation"
id: determine_sublocation
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]
then
# set root folder for main branch
echo "::set-output name=sublocation::"
else
# set beta folder for dev branch
echo "::set-output name=sublocation::beta"
fi
- name: Release to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/dist
destination_dir: ${{ steps.determine_sublocation.outputs.sublocation }}
cname: app.jimmi.party