diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ccc6665f9..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,47 +0,0 @@ - -version: 2 -jobs: - build: - branches: - only: - - master - - docker: - - image: cimg/rust:1.77.1-node - auth: - username: jasperrlz - password: $DOCKERHUB_PASSWORD - - working_directory: ~/repo - - steps: - - run: sudo apt-get update && sudo apt-get install rsync - - - checkout - - - restore_cache: - keys: - - v4-dependencies-{{ checksum "package.json" }}-{{ checksum "rust/Cargo.toml" }} - - - run: sudo npm install -g pnpm - - - run: pnpm --config.package-manager-strict=false install - - - run: pnpm --config.package-manager-strict=false run build - - - save_cache: - paths: - - node_modules - - .cache - - .cargo - key: v4-dependencies-{{ checksum "package.json" }}-{{ checksum "rust/Cargo.toml" }} - - - add_ssh_keys: - fingerprints: - - "4f:78:69:e1:6b:2d:bf:39:96:c5:4a:1c:d1:90:40:6e" - - - run: - name: deploy - command: | - echo 'iad1-shared-e1-29.dreamhost.com,173.236.136.139 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPWamoZmDg7rwutGWQSxvdjAW9QyAOL2Q6JDYmrO09kEPh7+FYyOm7AiEK8mn/mUxL8dPPOifzv2zy90BjEERAo=' >> ~/.ssh/known_hosts - rsync -va --delete-after --exclude=data/ --exclude=priv/ --exclude=.well-known/ dist/ gznoclip@iad1-shared-e1-29.dreamhost.com:noclip.website/ diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..ca79ca5b4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..3bef7758a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build and deploy + +on: + push: + paths-ignore: + - '**.md' + pull_request: + +jobs: + build: + name: Build and deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Cache Node dependencies + uses: actions/setup-node@v4 + with: + cache: pnpm + + - name: Cache Rust workspace + uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + + - name: Install Node dependencies + run: pnpm install + + - name: Run build + run: pnpm run build + + - name: Deploy + if: github.ref == 'refs/heads/master' + uses: burnett01/rsync-deployments@7.0.1 + with: + switches: -va --delete-after --exclude=data/ --exclude=priv/ --exclude=.well-known/ + path: dist/ + remote_path: noclip.website/ + remote_host: iad1-shared-e1-29.dreamhost.com + remote_user: gznoclip + remote_key: ${{ secrets.DEPLOY_KEY }}