Skip to content

tweaks

tweaks #14

Workflow file for this run

name: Push
on:
push:
branches:
- master
- production
- gatsby-documentation
permissions:
contents: write
jobs:
test-and-build-gatsby:
name: test-and-deploy-documentation
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Node.js ${{ matrix.node-version }} setup
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Npm install
run: npm install
- name: Test
run: npm run test
- name: Rewrite gatsby confing inside smoothdoc
run: cp smooth-doc-gatsby-config.js node_modules/smooth-doc/gatsby-config.js
- name: Build documentation website with gatsby
run: npm run build
- name: Deploy documentation to github pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: public # The folder the action should deploy.
# deploy:
# name: deploy
# needs: test
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [12.x]
# steps:
# - name: Set ENV to staging
# if: github.ref == 'refs/heads/master'
# run: echo "WB_ENV=staging" >> $GITHUB_ENV
# - name: Set ENV to production
# if: github.ref == 'refs/heads/production'
# run: echo "WB_ENV=production" >> $GITHUB_ENV
# - name: Checkout
# uses: actions/checkout@v2
# - name: Node.js ${{ matrix.node-version }} setup
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node-version }}
# cache: 'npm'
# - name: Npm install
# run: npm ci
# - name: AWS setup
# 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: Serverless install
# run: sudo npm i -g serverless@2.x
# - name: Build
# run: npm run build:${{ env.WB_ENV }}
# - name: Deploy to the ${{ env.WB_ENV }}
# run: sls deploy -s ${{ env.WB_ENV }}