From 53efb515755ad8cc7c86c5a5c45698329d437aab Mon Sep 17 00:00:00 2001 From: rubuy-74 Date: Tue, 30 Jul 2024 12:49:15 +0100 Subject: [PATCH] Deploy Website --- .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..4acf5d6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy website + +on: [push] + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - name: Repository Checkout + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install Netlify + run: npm install netlify-cli@17.10.1 -g + + - name: Install dependencies + run: npm ci + + - name: Build Project + run: npm run build + + - name: Deploy to Netlify + id: netlify_deploy + run: | + netlify deploy \ + --dir .next \ + --site ${{ secrets.NETLIFY_SITE_ID }} \ + --auth ${{ secrets.NETLIFY_API_TOKEN }} + diff --git a/.gitignore b/.gitignore index 4dcb7a1..b955719 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ node_modulesnode_modules/ + +# Local Netlify folder +.netlify