Skip to content

Commit

Permalink
fix deploy docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanku committed Jan 10, 2025
1 parent 757f567 commit 1777d35
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- run: yarn build
working-directory: docs/docusaurus
- run: |
find . -not -path './branch/*' -delete
find . -not -path './branch/*' -not -name "fly.toml" -not -name "Dockerfile" -delete
working-directory: /tools/C/rohankumar/substrate_docs_public/docusaurus
- run:
rm -rf /${{ github.ref_name }} && |
Expand Down
60 changes: 29 additions & 31 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,47 @@ on:

env:
CARGO_TERM_COLOR: always
DOCS_NAME: ${{ inputs.name || github.ref.name }}
PUBLIC_DOCS_DIR: /Users/rohan/Downloads/substrate_docs_public

jobs:
deploy-api-docs:
name: Deploy API documentation
runs-on: bwrc
environment: main
environment: docs
steps:
# - uses: superfly/flyctl-actions/setup-flyctl@ddcac349402ef55840d9870785f4df1890768078
# - run: just build
# working-directory: docs/api
# # TODO: Make sure to remove the secret exposure!
- uses: superfly/flyctl-actions/setup-flyctl@ddcac349402ef55840d9870785f4df1890768078
- run: just build
working-directory: docs/api
- run: |
echo ${{ secrets.FLY_API_TOKEN_API }} >> secrets.txt
# rm -rf /tools/C/rohankumar/substrate_docs_public/api/${{ inputs.name || github.ref_name }} && |
# cp -r target/doc /tools/C/rohankumar/substrate_docs_public/api/${{ inputs.name || github.ref_name }}
rm -rf ${{ env.PUBLIC_DOCS_DIR }}/api/${{ inputs.name || github.ref_name }} && |
cp -r target/doc ${{ env.PUBLIC_DOCS_DIR }}/api/${{ inputs.name || github.ref_name }}
working-directory: docs/api
# - run: flyctl deploy --remote-only --detach
# working-directory: /tools/C/rohankumar/substrate_docs_public/api
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_API }}
- run: flyctl deploy --remote-only --detach
working-directory: ${{ env.PUBLIC_DOCS_DIR }}/api
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_API }}
deploy-docs:
name: Deploy documentation
runs-on: bwrc
environment: main
environment: docs
steps:
# - uses: superfly/flyctl-actions/setup-flyctl@master
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'yarn'
# cache-dependency-path: docs/docusaurus/yarn.lock
# - run: yarn install
# working-directory: docs/docusaurus
# - run: yarn build
# working-directory: docs/docusaurus
# TODO: Make sure to remove the secret exposure!
- uses: superfly/flyctl-actions/setup-flyctl@master
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: docs/docusaurus/yarn.lock
- run: yarn install
working-directory: docs/docusaurus
- run: yarn build
working-directory: docs/docusaurus
- run: |
echo ${{ secrets.FLY_API_TOKEN_DOCS }} >> other_secrets.txt
# rm -rf /tools/C/rohankumar/substrate_docs_public/docusaurus/branch/${{ inputs.name || github.ref_name }} && |
# cp -r target/doc /tools/C/rohankumar/substrate_docs_public/docusaurus/branch/${{ inputs.name || github.ref_name }}
rm -rf ${{ env.PUBLIC_DOCS_DIR }}/docusaurus/branch/${{ inputs.name || github.ref_name }} && |
cp -r target/doc ${{ env.PUBLIC_DOCS_DIR }}/docusaurus/branch/${{ inputs.name || github.ref_name }}
working-directory: docs/docusaurus
# - run: flyctl deploy --remote-only --detach
# working-directory: /tools/C/rohankumar/substrate_docs_public/docusaurus
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DOCS }}
- run: flyctl deploy --remote-only --detach
working-directory: ${{ env.PUBLIC_DOCS_DIR }}/docusaurus
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DOCS }}

0 comments on commit 1777d35

Please sign in to comment.