Skip to content

Set URL based on branch and fix makefile syntax error #480

Set URL based on branch and fix makefile syntax error

Set URL based on branch and fix makefile syntax error #480

Workflow file for this run

name: Deploy Jekyll Site
on:
push:
branches:
- staging
- master
- dp-v1-prod
pull_request:
branches:
- staging
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Get system info
- run: ifconfig
- run: sudo dmidecode
- run: df -h
- run: free -m
- run: echo "GitHub branch is ${{ github.ref }}"
# Checks-out your repository under $GITHUB_WORKSPACE,
# so your workflow can access it
- name: Checkout repo
uses: actions/checkout@master
# Build Jekyll Site
- run: echo "Building Jekyll site"
- run: sudo gem install bundler
- run: sudo gem install jekyll
- run: sudo bundle install
- name: Set URL based on branch
run: |
if [[ "${{ github.ref }}" == "refs/heads/staging" ]]; then
sed -i 's|url: "https://hypha.coop"|url: "https://staging.hypha.coop"|' _config.yml
fi
- run: make build-dweb
env:
DP_AP_KEY: ${{ secrets.DP_AP_KEY }}
- run: make check
- name: Publish to Distributed Press Staging
if: ${{ github.ref == 'refs/heads/staging' }}
uses: hyphacoop/[email protected]
with:
publish_dir: _site
dp_url: https://dp.chanterelle.xyz
refresh_token: ${{ secrets.DISTRIBUTED_PRESS_STAGING_TOKEN }}
site_url: staging.hypha.coop
- name: Publish to Distributed Press Production
if: ${{ github.ref == 'refs/heads/master' }}
uses: hyphacoop/[email protected]
with:
publish_dir: _site
dp_url: https://api.distributed.press
refresh_token: ${{ secrets.DISTRIBUTED_PRESS_PRODUCTION_TOKEN}}
site_url: hypha.coop