Skip to content

Commit

Permalink
ci: using self host repl
Browse files Browse the repository at this point in the history
  • Loading branch information
MR-Addict committed Feb 21, 2024
1 parent a2dae56 commit 1c2ae94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .drone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ WORKDIR /app
COPY . .
COPY assets/bin/* /usr/local/bin/
RUN chmod u+x /usr/local/bin/mdbook*
RUN mdbook build
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/MR-Addict/mdbook-repl.git -b gh-pages --depth 1
RUN echo 'src = "/embed/"' >> book.toml && mdbook build && cp mdbook-repl/embed book

FROM nginx:stable-alpine-slim
EXPOSE 80
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Build
run: chmod u+x assets/bin/* && cp assets/bin/* /usr/local/bin && mdbook build
- name: Setup book
run: |
chmod u+x assets/bin/* && cp assets/bin/* /usr/local/bin
git clone https://github.com/MR-Addict/mdbook-repl.git -b gh-pages --depth 1
- name: Build books
run: |
mdbook build --dest-dir github
echo 'src = "/embed/"' >> book.toml && mdbook build --dest-dir vercel && cp mdbook-repl/embed vercel
- uses: amondnet/vercel-action@v25
with:
vercel-args: --prod
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
working-directory: ./book
working-directory: ./vercel

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
publish_dir: ./github

0 comments on commit 1c2ae94

Please sign in to comment.