Skip to content

Commit

Permalink
Revert "Build website with nix"
Browse files Browse the repository at this point in the history
This reverts commit 0d1937e.
  • Loading branch information
missytake committed Jun 3, 2024
1 parent ae6f0f1 commit 0066df8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 123 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/jekyll-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Install Bundler
run: sudo gem install bundler
- name: Cache bundle
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Jekyll
run: bundle install
- name: Build the site with Jekyll
run: nix build
run: |
bundle exec jekyll build --future
- name: Upload
run: |
mkdir -p "$HOME/.ssh"
echo "${{ secrets.KEY }}" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
rsync -rLtvh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/ "${{ secrets.USERNAME }}@delta.chat:/var/www/html/_site"
rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/_site/ "${{ secrets.USERNAME }}@delta.chat:/var/www/html/_site"
25 changes: 17 additions & 8 deletions .github/workflows/jekyll-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,28 @@ jobs:
export PULLREQUEST_ID=$(echo "${{ github.ref }}" | cut -d "/" -f3)
echo "prid=$PULLREQUEST_ID" >> $GITHUB_OUTPUT
if [ $(expr length "${{ secrets.USERNAME }}") -gt "1" ]; then echo "uploadtoserver=true" >> $GITHUB_OUTPUT; fi
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: |
echo "baseurl: /${{ steps.prepare.outputs.prid }}" >> _config.yml
- name: Install Bundler
run: sudo gem install bundler
- name: Cache bundle
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Jekyll
run: bundle install
- name: Build the site with Jekyll
run: nix build
run: |
bundle exec jekyll build --future --baseurl "/${{ steps.prepare.outputs.prid }}"
mkdir ${{ steps.prepare.outputs.prid }}
- name: Upload preview
run: |
mkdir -p "$HOME/.ssh"
echo "${{ secrets.KEY }}" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
rsync -rLtvh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/ "${{ secrets.USERNAME }}@delta.chat:/var/www/html/staging/${{ steps.prepare.outputs.prid }}/"
rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/_site/ "${{ secrets.USERNAME }}@delta.chat:/var/www/html/staging/${{ steps.prepare.outputs.prid }}/"
- name: "Post links to details"
id: details
Expand All @@ -45,8 +54,8 @@ jobs:
#check if comment already exists, if not post it
export GITHUB_API_URL="https://api.github.com/repos/deltachat/deltachat-pages/issues/${{ steps.prepare.outputs.prid }}/comments"
export RESPONSE=$(curl -L --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --url "$GITHUB_API_URL" --header "content-type: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28")
echo $RESPONSE > response
grep -v '"Check out the page preview at https://staging.delta.chat/' response && echo "comment=true" >> $GITHUB_OUTPUT || true
echo $RESPONSE > result
grep -v '"Check out the page preview at https://staging.delta.chat/' result && echo "comment=true" >> $GITHUB_OUTPUT || true
- name: "Post link to comments"
if: steps.details.outputs.comment
uses: actions/github-script@v6
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ build/
# for an optional virtual env folder
venv/

vendor/bundle

# Nix output.
result
vendor/bundle
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ Testing changes
the forked website will then be available at
`https://<your-username>.github.io/deltachat-pages/`

- If you have Nix installed,
you can build website preview in `result/` with `nix build`
or run `nix develop` and start `jekyll serve` in development shell
to have live preview at http://127.0.0.1:4000/en/
If you don't have Nix installed,
you can install it with [The Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer).

- Alternatively, [install Jekyll](https://jekyllrb.com/docs/installation/)
on your local machive, run `bundle install` in this directory,
and execute `bundle exec jekyll serve`.
Expand Down
2 changes: 1 addition & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ code {
h1,h2,h3,h4,h5,h6 {
&:hover {
.anchor::before {
content: "\1F517"
content: "🔗"
}
}
}
Expand Down
61 changes: 0 additions & 61 deletions flake.lock

This file was deleted.

38 changes: 0 additions & 38 deletions flake.nix

This file was deleted.

0 comments on commit 0066df8

Please sign in to comment.