remove tikoetter instance #31
Workflow file for this run
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: 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/[email protected] | |
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 |