Skip to content

Commit

Permalink
Github action to deploy to Staging (#82) (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
andynog authored Nov 30, 2023
1 parent 4255daf commit d859903
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Deploy to Netlify Staging
# This workflow runs manually to deploy the
# CometBFT documentation staging website to Netlify
on:
push:
branches:
- main
jobs:
build:
name: Build and deploy to Netlify (Staging)
runs-on: ubuntu-latest
container:
image: jekyll/builder:stable
env:
JEKYLL_UID: 1001
JEKYLL_GID: 1001
steps:
# Checkout cometbft-docs repo
- name: Checkout site
uses: actions/checkout@v3
# Clone the cometbft repo
- name: Fetch cometbft repo
run: make fetch
# Generate _data folder content
- name: Build versions data
run: make versions-data
# Install Jekyll dependencies
- name: Install dependencies
run: |
bundle install
# Build the Jekyll website
- name: Build website
run: |
chmod a+wx .
bundle exec jekyll build --disable-disk-cache -V
# Deploy the _site folder to Netlify CometBFT documentation website
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './_site'
deploy-message: "Deploy from cometbft-docs GitHub Actions"
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_STAGING_SITE_ID }}
timeout-minutes: 5

0 comments on commit d859903

Please sign in to comment.