diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index d3652023..00000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: publish -on: - push: - branches: - - main -# Recommended by https://github.com/JamesIves/github-pages-deploy-action -permissions: - contents: write -jobs: - github-pages: - runs-on: ubuntu-latest - container: python:3.8 - steps: - - uses: actions/checkout@v3 - - name: Install system dependencies. - run: apt-get update && apt-get install -y rsync - - name: Install the site generator. - run: pip install -r requirements.txt - - name: Build the static site. - run: aep-site-gen . out - - name: Publish the static site to GitHub Pages. - uses: jamesives/github-pages-deploy-action@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - folder: out diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c9d075be..804d5b9c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,10 +7,8 @@ on: jobs: build: runs-on: ubuntu-latest - container: python:3.8 + container: node:20 steps: - uses: actions/checkout@v3 - - name: Install the site-generator - run: pip install -r requirements.txt - - name: Build the site. - run: aep-site-gen . /out + - name: Generate all static pages, and build site. + run: ./scripts/build.sh diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 00000000..b23dd470 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -x +export AEP_LOCATION="${PWD}" +export SG_DIRECTORY="/tmp/site-generator-beta" +AEP_LINTER_LOC="${SG_DIRECTORY}/api-linter" +if [ ! -d "${SG_DIRECTORY}" ]; then + git clone https://github.com/aep-dev/site-generator-beta.git "${SG_DIRECTORY}" +fi + +if [ ! -d "${AEP_LINTER_LOC}" ]; then + git clone https://github.com/aep-dev/api-linter.git "${AEP_LINTER_LOC}" +fi +cd "${SG_DIRECTORY}" || exit +# make rules / website folder +mkdir -p src/content/docs/tooling/linter/rules +mkdir -p src/content/docs/tooling/website +npm install +npm run generate \ No newline at end of file diff --git a/scripts/serve.sh b/scripts/serve.sh new file mode 100755 index 00000000..d34b5665 --- /dev/null +++ b/scripts/serve.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -x +. ./scripts/build.sh +npm run preview \ No newline at end of file