fix: build directly with npm+typst instead of nix (bypasses sandbox network restriction)
Some checks failed
Build and Deploy to Storj / build-and-deploy (push) Failing after 4s
Some checks failed
Build and Deploy to Storj / build-and-deploy (push) Failing after 4s
This commit is contained in:
parent
8ca5f170e4
commit
4874cdd724
1 changed files with 17 additions and 18 deletions
|
|
@ -9,32 +9,31 @@ jobs:
|
|||
build-and-deploy:
|
||||
runs-on: nixos
|
||||
env:
|
||||
PATH: /run/current-system/sw/bin
|
||||
NIX_BUILD_CORES: 4
|
||||
NIX_MAX_JOBS: 1
|
||||
steps:
|
||||
- name: Create working directory
|
||||
run: |
|
||||
rm -rf /tmp/brand-site-${{ github.run_id }}
|
||||
mkdir -p /tmp/brand-site-${{ github.run_id }}
|
||||
echo "WORKDIR=/tmp/brand-site-${{ github.run_id }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Clone repo
|
||||
run: |
|
||||
export WORKDIR=/tmp/brand-site-${{ github.run_id }}
|
||||
git clone http://localhost:3000/sscoble/brand-site.git "$WORKDIR"
|
||||
cd "$WORKDIR"
|
||||
git clone http://localhost:3000/sscoble/brand-site.git "${{ env.WORKDIR }}"
|
||||
cd "${{ env.WORKDIR }}"
|
||||
git checkout ${{ github.sha }}
|
||||
echo "WORKDIR=$WORKDIR" >> $GITHUB_ENV
|
||||
|
||||
- name: Build website with Nix
|
||||
run: nix build .#website --option sandbox false --no-write-lock-file --cores 4 --max-jobs 1
|
||||
working-directory: ${{ env.WORKDIR }}
|
||||
- name: Build website
|
||||
run: |
|
||||
cd "${{ env.WORKDIR }}"
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Build speaker profile PDF
|
||||
run: nix build .#speaker-profile --option sandbox false --no-write-lock-file --cores 4 --max-jobs 1
|
||||
working-directory: ${{ env.WORKDIR }}
|
||||
|
||||
- name: Copy build artifacts
|
||||
run: |
|
||||
mkdir -p ./dist
|
||||
cp -r ${{ env.WORKDIR }}/result/* ./dist/
|
||||
mkdir -p ./public/downloads
|
||||
cp ${{ env.WORKDIR }}/result-2/* ./public/downloads/ 2>/dev/null || true
|
||||
cd "${{ env.WORKDIR }}"
|
||||
typst compile one-sheet.typ ./Scott-Scoble-Human-Cultivation-Expert-Speaker-Profile.pdf
|
||||
|
||||
- name: Configure rclone
|
||||
run: |
|
||||
|
|
@ -50,5 +49,5 @@ jobs:
|
|||
|
||||
- name: Deploy to Storj
|
||||
run: |
|
||||
rclone sync ./dist/ storj:${{ secrets.STORJ_BUCKET }}/ --progress
|
||||
rclone sync ./public/downloads/ storj:${{ secrets.STORJ_BUCKET }}/downloads/ --progress
|
||||
rclone sync "${{ env.WORKDIR }}/dist/" storj:${{ secrets.STORJ_BUCKET }}/ --progress
|
||||
rclone sync "${{ env.WORKDIR }}/one-sheet/" storj:${{ secrets.STORJ_BUCKET }}/downloads/ --progress 2>/dev/null || true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue