Skip to content

Commit

Permalink
fix: deploy back to github pages with the contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
nirgn975 committed Oct 26, 2022
1 parent ebba002 commit d8f8d0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
39 changes: 6 additions & 33 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:

- name: Install and build website
uses: withastro/action@v0
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
# package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

publish-release:
needs: build
Expand All @@ -43,39 +39,16 @@ jobs:
with:
release-branches: '["main"]'

# deploy:
# needs: build
# runs-on: ubuntu-latest
# name: Deploy to GitHub pages
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1

deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy to Netlify
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3

- name: Install and build website
uses: withastro/action@v0

- name: Publish
uses: nwtgck/[email protected]
with:
publish-dir: "./dist"
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

build-index:
needs: deploy
Expand Down
7 changes: 6 additions & 1 deletion src/pages/contact.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import Layout from "../layouts/Layout.astro";

<Layout title="Homepage">
<div class="mt-12 mx-auto max-w-4xl">
<form name="contact" netlify class="grid grid-cols-1 gap-y-6 sm:grid-cols-2 sm:gap-x-8">
<form
name="contact"
class="grid grid-cols-1 gap-y-6 sm:grid-cols-2 sm:gap-x-8"
action="https://getform.io/f/75c12049-9fa0-4eff-a3e7-78a02f36cbff"
method="POST"
>
<div>
<label for="first-name" class="text-sm font-medium text-zinc-700 dark:text-zinc-400">First name</label>
<div class="mt-1">
Expand Down

0 comments on commit d8f8d0f

Please sign in to comment.