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

chore: Add netlify preview build via github actions. #271

Merged
merged 1 commit into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
with:
tags: toxchat/toktok.github.io:latest
outputs: type=docker
- name: Extract toktok-site directory from docker image
run: docker run --rm --entrypoint tar toxchat/toktok.github.io:latest -C /home/builder/build -c toktok-site | tar -x
- name: Upload toktok-site to artifacts
- name: Extract _site directory from docker image
run: docker run --rm --entrypoint tar toxchat/toktok.github.io:latest -C /home/builder/build -c _site | tar -x
- name: Upload _site to artifacts
uses: actions/upload-artifact@v4
with:
name: toktok-site
path: toktok-site
name: _site
path: _site
if-no-files-found: error
6 changes: 3 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
with:
tags: toxchat/toktok.github.io:latest
outputs: type=docker
- name: Extract toktok-site directory from docker image
run: docker run --rm --entrypoint tar toxchat/toktok.github.io:latest -C /home/builder/build -c toktok-site | tar -x
- name: Extract _site directory from docker image
run: docker run --rm --entrypoint tar toxchat/toktok.github.io:latest -C /home/builder/build -c _site | tar -x
- name: Set-up Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: toktok-site
path: _site
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ concurrency:
jobs:
release:
uses: TokTok/ci-tools/.github/workflows/release-drafter.yml@master

netlify:
uses: TokTok/ci-tools/.github/workflows/netlify.yml@master
with:
dockerfile: Dockerfile
path: /home/builder/build
secrets:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ RUN ["make", "toktok-site"]
COPY .md-style.rb /home/builder/build/
RUN ["make", "lint"]
RUN . /path/to/venv/bin/activate \
&& make check
&& make check \
&& mv toktok-site _site

WORKDIR /home/builder/build/toktok-site
WORKDIR /home/builder/build/_site
ENTRYPOINT ["/home/builder/entrypoint.sh"]
3 changes: 0 additions & 3 deletions netlify.toml

This file was deleted.

Loading