Skip to content

Moving to workflows directory #1

Moving to workflows directory

Moving to workflows directory #1

Workflow file for this run

name: Hugo Build and Deploy
on: push
env:
BASE_URL: ${{ (github.ref == 'refs/heads/master' && 'gen3.org') || 'alpha.gen3.org' }}
AWS_BUCKET: ${{ env.BASE_URL }}

Check failure on line 7 in .github/workflows/hugo_ci.yaml

View workflow run for this annotation

GitHub Actions / Hugo Build and Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/hugo_ci.yaml (Line: 7, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.BASE_URL
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.100.2'
extended: true
- name: Setup Asciidoctor
run: sudo apt-get install -y asciidoctor # support asciidoc files
- name: Update Config (replace {BASE_URL})
run: sed -i "s|{BASE_URL}|${BASE_URL}|g" config.yaml
- name: Build Site
run: hugo
- name: Install AWS CLI
uses: chrislennon/[email protected]
- name: Deploy to S3
run: |
cd ${{ github.event.repository.name }}
aws s3 cp users s3://${{ env.AWS_BUCKET }}/ --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}