Skip to content

Merge pull request #7 from survanetwork/renovate/actions-setup-node-4.x #23

Merge pull request #7 from survanetwork/renovate/actions-setup-node-4.x

Merge pull request #7 from survanetwork/renovate/actions-setup-node-4.x #23

Workflow file for this run

name: Website build & deployment to AWS S3 bucket
on:
push:
branches:
- main
jobs:
build-deploy:
name: Build and deploy static website to AWS S3
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install Yarn dependencies
run: yarn install --immutable
- name: Docusaurus .docusaurus folder cache
id: cache-docusaurus-cache
uses: actions/cache@v3
with:
path: .docusaurus
key: ${{ runner.os }}-docusaurus-cache
- name: Docusaurus build folder cache
id: cache-docusaurus-build
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-docusaurus-build
- name: Build Docusaurus page
run: yarn build
env:
UMAMI_HOST: https://umami.landway.space
UMAMI_ID: 15870ee3-cc74-4306-b83e-e0c6e873b88f
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Upload to AWS S3
run: aws s3 sync build s3://plugin-docs.surva.net --delete