From 87be677be8a984df47cc96d9985f4f3d2c3819b3 Mon Sep 17 00:00:00 2001 From: DanielRasho Date: Sun, 5 Nov 2023 14:57:33 -0600 Subject: [PATCH] Add files for github workflows --- .github/workflows/jekyll-gh-pages.yml | 52 +++++++++++++++++++++++++++ default.nix | 13 +++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/jekyll-gh-pages.yml create mode 100644 default.nix diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..d9e849a --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,52 @@ +defaults: + run: + shell: bash + +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - name: Install dependencies + run: nix-shell ./default.nix --run "yarn install" + - name: Build + run: yarn build + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload dist repository + path: './frontend/dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..4cd7db1 --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +let + nixpkgs = import {}; +in + with nixpkgs; + stdenv.mkDerivation { + name = "Dev environment shell"; + buildInputs = [ + nodejs + yarn + ]; + shellHook = '' + ''; + } \ No newline at end of file