Some checks failed
Build and Deploy to Storj / build-and-deploy (push) Failing after 1s
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Build and Deploy to Storj
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: nixos
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build website with Nix
|
|
run: nix build .#website --no-write-lock-file
|
|
|
|
- name: Build speaker profile PDF
|
|
run: nix build .#speaker-profile --no-write-lock-file
|
|
|
|
- name: Copy build artifacts
|
|
run: |
|
|
mkdir -p ./dist
|
|
cp -r result/* ./dist/
|
|
mkdir -p ./public/downloads
|
|
cp result-2/* ./public/downloads/ 2>/dev/null || true
|
|
|
|
- name: Configure rclone
|
|
run: |
|
|
mkdir -p ~/.config/rclone
|
|
cat > ~/.config/rclone/rclone.conf << 'EOF'
|
|
[storj]
|
|
type = s3
|
|
provider = Storj
|
|
access_key_id = ${{ secrets.STORJ_ACCESS_KEY }}
|
|
secret_access_key = ${{ secrets.STORJ_SECRET_KEY }}
|
|
endpoint = https://gateway.storjshare.io
|
|
EOF
|
|
|
|
- name: Deploy to Storj
|
|
run: |
|
|
rclone sync ./dist/ storj:${{ secrets.STORJ_BUCKET }}/ --progress
|
|
rclone sync ./public/downloads/ storj:${{ secrets.STORJ_BUCKET }}/downloads/ --progress
|