Skip to content

Production Documentation #88

Production Documentation

Production Documentation #88

Workflow file for this run

---
name: Production Documentation
on:
workflow_dispatch:
#push:
# tags:
# - '*'
# - '!**beta**'
# - '!**alpha**'
# - '!**tatum**'
jobs:
deploy:
name: Build and deploy documentation to production
environment:
name: production
url: https://docs.streamr.network
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
run: npm run bootstrap
- name: Build documentation
working-directory: ./docs
run: npm ci && npm run build
- name: Get version string from git tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Print version string
run: echo ${{ steps.get_version.outputs.VERSION }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_KEY_PROD_DOCS }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_PROD_DOCS }}
aws-region: eu-west-1
- name: Deploy to S3
working-directory: ./docs
run: |
aws s3 sync build/. s3://docs.streamr.network --acl private
- name: Invalidate Cloudfront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID_PROD_DOCS }} --paths "/*"