Skip to content

Commit

Permalink
feat(): add workflow file and update variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Shek committed Sep 19, 2023
1 parent 291919e commit 955d1fa
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .env

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: stacks.website
on:
push:
paths:
- 'src/**'
pull_request:
branches:
- master
- feat/ensono-rebrand
- feat/testing-deployment
jobs:
build-and-deploy:
name: Build and Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
# Checkout the documentation repository
- name: Checkout Repo
uses: actions/checkout@v4
# Configure node so that the build can run
- name: Use NodeJS
uses: actions/setup-node@v4
with:
node-version: '16.14.x'
# Install Node dependencies
- name: Install Dependencies
run: npm install
# Build the website
- name: Generate Website
run: npm run build
env:
# Secrets from GitHub go here
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
# Deploy to GHitHub Pages
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.3.3
with:
branch: gh-pages
folder: build
clean: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ yarn-debug.log*
yarn-error.log*
.vscode/*
.vs/*
.env
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const config = {
"OWASP",
],
docSearch: {
appId: process.env.DOCSEARCH_APP_ID,
apiKey: process.env.DOCSEARCH_API_KEY,
indexName: process.env.DOCSEARCH_INDEX_NAME,
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
indexName: process.env.ALGOLIA_INDEX_NAME,
}
},
themeConfig: {
Expand Down

0 comments on commit 955d1fa

Please sign in to comment.