Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add publish script #94

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 5 additions & 36 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,14 @@ on:
push:
branches:
- main
workflow_dispatch:
# Recommended by https://github.com/JamesIves/github-pages-deploy-action
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
publish:
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v3
- name: Clone aep.dev
uses: actions/checkout@v3
with:
repository: aep-dev/aep.dev
path: './aep-dev'
- name: Clone Site Generator
uses: actions/checkout@v3
- name: Trigger site generator repo
uses: peter-evans/repository-dispatch@v3
with:
event-type: publish-event
repository: aep-dev/site-generator-beta
path: './site-generator-beta'
- name: Install system dependencies.
run: apt-get update && apt-get install -y rsync
- name: Create rules folder
run: mkdir site-generator-beta/src/content/docs/tooling/linter/rules
- name: Install all dependencies.
working-directory: ./site-generator-beta
run: npm install
- name: Generate all static pages.
working-directory: ./site-generator-beta
run: AEP_LOCATION=../aep-dev AEP_LINTER_LOC=../ npm run generate
- name: Build website
working-directory: ./site-generator-beta
run: npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: site-generator-beta/dist
repository-name: aep-dev/site-generator-beta
branch: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GH_PAT }}