Merge pull request #332 from twilson63/jfrain99/migrate-to-perma-deploy #184
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish cookbook | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: ⎔ Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: 📥 Download deps | |
run: | | |
cd docs | |
yarn | |
- name: 🛠 Build Docs | |
id: build_artifacts | |
run: | | |
cd docs | |
yarn build | |
echo "artifacts_output_dir=src/.vuepress/dist" >> $GITHUB_OUTPUT | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
SPECIAL_ACCESS_TOKEN: ${{ secrets.SPECIAL_ACCESS_TOKEN }} | |
- name: 💾 Publish to Arweave | |
id: publish_artifacts | |
run: | | |
cd docs | |
npx permaweb-deploy \ | |
--ant-process=${ANT_PROCESS} \ | |
--undername=${UNDERNAME} \ | |
--deploy-folder=${ARTIFACTS_OUTPUT_DIR} | |
env: | |
DEPLOY_KEY: ${{ secrets.COOKBOOK }} | |
ARTIFACTS_OUTPUT_DIR: ${{ steps.build_artifacts.outputs.artifacts_output_dir }} | |
ANT_PROCESS: tP8uMeEQR-zodP_jHRyLJf1K7TZtACUsBrn8wdYlGuc | |
UNDERNAME: "@" | |
- name: Discord Notification | |
uses: Ilshidur/action-discord@master | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
with: | |
args: "The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed." |