-
Notifications
You must be signed in to change notification settings - Fork 1
Add docker and Makefiles #7
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: "Automatically mark PRs to sync" | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
|
|
||
| jobs: | ||
| labeler: | ||
| if: github.event.pull_request.user.type != 'Bot' | ||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Add "sync" label to PR | ||
| run: gh pr edit "$PR_URL" --add-label sync --repo "$PR_REPO" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| PR_REPO: ${{ github.repository }} | ||
|
|
||
| - name: Comment on PR to explain sync label | ||
| run: gh pr comment "$PR_URL" --body "This pull request has been marked to **automatically sync** to its base branch. You can **disable** this behavior by removing the `sync` label." --repo "$PR_REPO" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| PR_REPO: ${{ github.repository }} |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: "Automatically enable auto-merge on PRs" | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - ready_for_review | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| enable-automerge: | ||
| if: github.event.pull_request.draft == false | ||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Enable auto-merge for the PR | ||
| run: gh pr merge "$PR_URL" --auto --squash | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PR_AUTO_UPDATE_TOKEN }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: pr-auto-update | ||
| on: | ||
| push: {} | ||
|
|
||
| jobs: | ||
| pr-auto-update: | ||
| name: Automatic PR Updater | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| contents: write | ||
| steps: | ||
| - name: Generate Access Token | ||
| uses: actions/create-github-app-token@v2 | ||
| id: generate-token | ||
| with: | ||
| app-id: ${{ vars.PR_AUTO_UPDATE_CLIENT_ID }} | ||
| private-key: ${{ secrets.PR_AUTO_UPDATE_PRIVATE_KEY }} | ||
|
|
||
| - uses: CSSUoB/pr-auto-updater@v2.3.1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
| PR_FILTER: 'labelled' | ||
| PR_LABELS: 'sync' | ||
| MERGE_CONFLICT_ACTION: 'label' | ||
| MERGE_CONFLICT_LABEL: 'conflict' |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| FROM ruby:4.0.1 AS base | ||
|
|
||
| RUN bundle config set frozen 'true' && \ | ||
| bundle config set path '/vendor/bundle' | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| COPY Gemfile Gemfile.lock ./ | ||
| RUN bundle install | ||
|
|
||
| COPY . . | ||
|
|
||
| FROM base AS build-step | ||
| RUN bundle exec jekyll build | ||
|
|
||
| FROM scratch AS build | ||
| COPY --from=build-step /usr/src/app/_site / | ||
|
|
||
| FROM base AS server | ||
| EXPOSE 4000 | ||
| CMD bundle exec jekyll serve --host 0.0.0.0 --port 4000 --destination /tmp/_site |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| .PHONY: all build serve clean | ||
|
|
||
| all: build | ||
|
|
||
| build: clean | ||
| docker buildx build . --target build --output type=local,dest=./_site | ||
|
|
||
| serve: | ||
| docker compose up --build | ||
|
|
||
| clean: | ||
| rm -rf _site | ||
|
|
||
| fmt: | ||
| npm run format:fix | ||
|
|
||
| lint: | ||
| npm run lint:fix | ||
|
|
||
| spellcheck: | ||
| npm run spellcheck:staged | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| services: | ||
| jekyll: | ||
| build: | ||
| context: . | ||
| target: server | ||
| volumes: | ||
| - "./:/usr/src/app" | ||
| ports: | ||
| - "4000:4000" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.