How to create new fpm project using template
fpm-template
on github?We can create a new fpm project on github. This can be done by creating a github
repository using fpm-template
Follow the following steps to achieve this
Create a new github repository
Go to this url and create a new repository.
Rewrite file
In the FPM.ftd file, rewrite the package name and zip
-- fpm.package: <package-name> zip: <url-where-repo-is-available>
As this is github repo, the <package-name>
should be
<github organisation/username>.github.io/<repository name>
. In case if the organisation/user
name is Fifthtry
and repository is forest-cs
, then the <package-name>
would be
fifthtry.github.io/forest-cs
.
The <url-where-repo-is-available>
should be github.com/fifthtry/forest-cs/archive/refs/heads/main.zip
Push Changes and Github Workflow
Now, push these changes in the github repository. The pushing would run the github workflow.
![](/-/fpm.dev/static/images/author/workflow-running.png)
Running github workflow
On successful execution of workflow, the
gh-pages
branch would be created.![](/-/fpm.dev/static/images/author/successful-workflow.png)
Successful github workflow
![](/-/fpm.dev/static/images/author/gh-pages.png)
Branch
gh-pages
Publish Site (Github Pages)
In github, Go to the Settings
and then in TOC, go to Pages
In the Source
, select the gh-pages
branch and then select the /(root)
and then click on Save
.
This publish the site https://fifthtry.github.io/forest-cs/
![](/-/fpm.dev/static/images/author/publish-site.png)
Publish site