A skeleton for setting up a Jekyll blog that automatically builds and deploys on fly.io via GitHub Actions
flyctl
tool: https://fly.io/docs/hands-on/install-flyctl/flyctl auth login
flyctl launch
to set up your app, answer as follows:y
to copy the existing configuration to your new appN
(or press enter) to creating a Postgresql databaseN
(or press enter) to creating a Redis databasey
to deploy nowflyctl ips list
to get your app's public IP@
and the "Value" will be the IP address for each record. Be sure to delete any other A records or CNAMEs from other configurations or parking pages.flyctl certs create example.com
replacing example.com
with your actual domain.flyctl certs show example.com
to check the status. This typically only takes a few minutes. You may be asked for an additional ownership verification: if the Status is "Ready" and there is a "DNS Validation Instructions" field listed, you will need to complete as directed. This is typically adding a CNAME in your domain's DNS from the given hostname (something like _acme-challenge.example.com
) to the target value (something like example.com.5xzw.flydns.net
). Once completed, check again with flyctl certs show example.com
to see the status; this should also only take a few minutes. When finished you will see a message like "The certificate for example.com has been issued."flyctl auth token
to get an API token for your appFLY_API_TOKEN
and the Secret with the API token from step 1, then click Add secretindex.markdown
), and commit/push to your repositoryThe workflow and Dockerfile are configured to pass any Secrets from the GitHub settings into the build context as environment variables, and interpolate those values into _config.yml
and nginx.conf
. For example, if you set a repository secret called MY_COOL_API_KEY
, you will be able to reference ${MY_COOL_API_KEY}
in your settings so as to not expose this key by checking it into the repository.
_config.yml
or nginx.conf
, replace whatever sensitive value you are trying to hide with a variable name, i.e.:Before:
webservice:
access_token: 1234-dead-beef
After:
webservice:
access_token: ${MY_COOL_API_KEY}
Any existing environment variables will be interpolated, so be careful if using Nginx variables.
MY_COOL_API_KEY
) and the Secret with its value (i.e., 1234-dead-beef
), then click Add secretDark Visitors is a service that provides live monitoring for automated User Agents and sources that information to maintain a list of known AI scrapers and crawlers. You can configure your Jekyll site to both send events to Dark Visitors for tracking and to block AI scrapers. It's free up to a certain amount of traffic.
nginx.conf
with nginx-darkvisitors.conf
, either copy paste the contents or rename it to nginx.conf
and replace the old oneDockerfile
, change the base image from plain Nginx to OpenRestyReplace the line:
FROM nginx:alpine AS runner
with:
FROM openresty/openresty:alpine AS runner
And update the destination of nginx.conf
,
Replace the line:
COPY --from=builder /build-zone/nginx.conf /etc/nginx/nginx.conf
with:
COPY --from=builder /build-zone/nginx.conf /etc/nginx/conf.d/site.conf
You will notice comments in the Dockerfile mentioning both of these.
ClaudeBot
should result in a 403